# -*- coding: utf-8 -*-
# standard
import os
import sys

# third
from pydantic import BaseModel, Field

# local
_P_PATH =  os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
if _P_PATH not in sys.path:
    sys.path.append(_P_PATH)


"""
@Title:   
@File: temp.py
@Author: walle 2025年01日14日 17时18分25秒
@Version: 1.0.0
@Desc: 
"""


class Person(BaseModel):
    name: str = Field(...)
    age: int | None = Field(None)

    def __init__(self, **kwargs):
        kwargs['age'] = 10
        super().__init__(**kwargs)
    
    def set_arg(self):
        self.age = 10


if __name__ == '__main__':
    p = Person(name="张三")
    p
    pass